<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-Hant" xmlns:fb="http://ogp.me/ns/fb#" xmlns:og="http://ogp.me/ns#" >
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/yui/3.3.0/build/cssreset/reset-min.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<style type="text/css">
body { overflow:hidden; }
textarea { display:block; margin:0; padding:0.6em; font-family:monospace; border:none;}
</style>
</head>
<body>
<textarea id="code"></textarea>
<script type="text/javascript">
(function(){

// resize textarea with full screen
function resizeTextarea()
{
    $("#code").css('height', $(window).height())
    .css('width', $(window).width() - 16);
}
$(window).resize(resizeTextarea);
resizeTextarea();

// load src
var src = location.href.match(/[&\?]src=([^&\?=]+)/);
if(src !== null)
{
    src = src[1];
    // console.log(src);
    $("title").text(src);
    $.ajax(
        {
            url:src,
            dataType: 'html'
        })
    .done(function(txt){
        $("#code").val(txt);    
    });
}


$("#code").focus().attr('readonly','readonly');

})();

</script>
</body>
</html>

